package com.scujj.cs6.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.scujj.cs6.model.dto.question.QuestionCreateDTO;
import com.scujj.cs6.model.dto.question.QuestionUpdateDTO;
import com.scujj.cs6.model.entity.Question;
import com.scujj.cs6.model.vo.FollowQuestionVo;
import com.scujj.cs6.model.vo.PageVo;
import com.scujj.cs6.model.vo.QuestionVo;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.validation.Valid;

import java.util.List;

/**
* @author FlanChan
* @description 针对表【question】的数据库操作Service
* @createDate 2025-03-25 21:21:24
*/
public interface QuestionService extends IService<Question> {

    PageVo<QuestionVo> getQuestions(int page , int size , List<String> tags, String topic);

    void createQuestion(@Valid QuestionCreateDTO questionDTO, HttpServletRequest request);

    void updateQuestion(Long id, @Valid QuestionUpdateDTO questionDTO, HttpServletRequest request);

    void deleteQuestion(Long id);

    PageVo<QuestionVo> getMyQuestions(int page , int size, HttpServletRequest request);

    List<QuestionVo> getTop5Questions();

    PageVo<FollowQuestionVo> getFollowQuestions(int page, int size, HttpServletRequest request);

    QuestionVo getQuestionById(Long id);
}
